package com.hfkh;

/**
 * @Author MDD
 * @Description
 * @Version
 * @Date
 **/
//无限录入数组长度
public class Add_int {
    public void addName(int...num){
        int count = num.length;
        System.out.println("本次参加考试的有"+count+"人，名单如下：");
        for (int i = 0; i < num.length; i++) {
            System.out.print(num[i]+"\t");
        }
    }
    public static void main(String[] args) {
        Add_int add = new Add_int();
        add.addName(1,2,3,5,4,5,6,7,8,9);
    }
}
